<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>出单结果</title>
    <link href="${base}/resource/admin/css/common.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="${base}/resource/admin/js/jquery.js"></script>
    <script type="text/javascript" src="${base}/resource/admin/js/jquery.validate.js"></script>
    <script type="text/javascript" src="${base}/resource/admin/js/common.js"></script>
    <script type="text/javascript" src="${base}/resource/admin/js/input.js"></script>
    <script type="text/javascript" src="${base}/resource/admin/layer/layer.js"></script>
    <script type="text/javascript">

        $().ready(function() {
            var $inputForm = $("#inputForm");
            [@flash_message /]
        });
    </script>
</head>
<body>
<div class="path">
    <a href="${base}/admin/common/index.do">首页</a> &raquo;保单详情
</div>
<form id="inputForm" action="shipResultSubmit" method="post" class="required-form" onsubmit="return validateForm(this)">
    <input type="hidden" name="orderId" value="${entity.id}"/>
    <input type="hidden" name="orderItemId" value="${orderItem.id}"/>
    <table class="input tabContent">
    <tr>I
        <td colspan="2" style="color: #CC0000">&nbsp;务必仔细核实信息</td>
    </tr>
    <tr>
        <th>
            sn
        </th>
        <td>
            ${entity.sn}
        </td>
    </tr>
    <tr>
        <th>
            金额
        </th>
        <td>
            ${entity.amount}元
        </td>
    </tr>
    <tr>
        <th>
            会员
        </th>
        <td>
            <a href="">${entity.member.username}</a>
        </td>
    </tr>
    <tr>
        <th>
            支付状态
        </th>
        <td>
                    <span class="fieldSet">
                    [#if entity.paymentStatus='unpaid'] 未支付
                    [#elseif entity.paymentStatus='partialPayment']部分支付
                    [#elseif entity.paymentStatus='paid']<span style="color: #CC0000">已支付</span>
                    [#elseif entity.paymentStatus='partialRefunds']部分退款
                    [#elseif entity.paymentStatus='refunded']已退款
                    [/#if]
                    </span>
        </td>
    </tr>
    <tr>
        <th>
            <span class="requiredField">*</span>保单状态
        </th>
        <td>
                    <span class="fieldSet">
                    [#if entity.shippingStatus='unshipped'] 未出单
                    [#elseif entity.shippingStatus='shipped']出单中
                    [#elseif entity.shippingStatus='partialReturns']部分退单
                    [#elseif entity.shippingStatus='returned']出单失败
                    [/#if]
                    </span>
        </td>
    </tr>
    <tr>
        <th>
            <span class="requiredField">*</span>订单状态
        </th>
        <td>
                    <span class="fieldSet">
                    [#if entity.orderStatus='unconfirmed'] 未确认
                    [#elseif entity.orderStatus='confirmed']已确认
                    [#elseif entity.orderStatus='completed']已完成
                    [#elseif entity.orderStatus='cancelled']已取消
                    [/#if]
                    </span>
        </td>
    </tr>
    <tr>
        <th>
            订单附言
        </th>
        <td>
        ${entity.memo}
        </td>
    </tr>
    <tr>
        <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
        <th>
            商品编号
        </th>
        <td>
            ${orderItem.sn}
        </td>
    </tr>
    <tr>
        <th>
            商品名称
        </th>
        <td>
        ${orderItem.name}
        </td>
    </tr>
    <tr>
        <th>
            商品金额
        </th>
        <td>
            ${orderItem.price}
        </td>
    </tr>
    <tr>
        <th>
            <span class="requiredField">*</span>被保险人姓名
        </th>
        <td>
             <span class="fieldSet">
                 <input type="text" name="cName" class="text required" value=" ${orderItem.cName}" maxlength="64" />
             </span>
        </td>
    </tr>
    <tr>
        <th>
            <span class="requiredField">*</span>被保险人身份证
        </th>
        <td>
             <span class="fieldSet">
                 <input type="text" name="cardNo" class="text required" value=" ${orderItem.cardNo}" maxlength="64" />
             </span>
        </td>
    </tr>
    <tr>
        <th>
            <span class="requiredField">*</span>被保险人联系电话
        </th>
        <td>
             <span class="fieldSet">
                 <input type="text" name="cMobile" class="text required" value=" ${orderItem.cMobile}" maxlength="64" />
             </span>
        </td>
    </tr>
    <tr>
        <th>
            <span class="requiredField">*</span>生效日期
        </th>
        <td>
             <span class="fieldSet">
                 <input type="text" name="cBeginDate" class="text required" value=" ${orderItem.cBeginDate}" maxlength="64" />
             </span>
        </td>
    </tr>
    <tr>
        <th>
            被保险人性别
        </th>
        <td>
             <span class="fieldSet">
                 <input type="text" name="cSex" class="text required" value=" ${orderItem.cSex}" maxlength="64" />
             </span>
        </td>
    </tr>
    <tr>
        <th>
            被保险人出生日期
        </th>
        <td>
             <span class="fieldSet">
                 <input type="text" name="cBirthDate" class="text required" value=" ${orderItem.cBirthDate}" maxlength="64" />
             </span>
        </td>
    </tr>
    <tr>
        <th>
            保单编号
        </th>
        <td>
             <span class="fieldSet">
                 <input type="text" name="cNo" class="text" value=" ${orderItem.cNo}" maxlength="64" />
             </span>
        </td>
    </tr>
    <tr>
        <th>
            <span class="requiredField">*</span>出单状态:
        </th>
        <td>
            <select name="cStatus" class="required">
                <option value="1">成功</option>
                <option value="0">失败</option>
            </select>
        </td>
    </tr>
    <tr>
        <th>
            <span class="requiredField">*</span>发送出单短信:
        </th>
        <td>
            <input type="checkbox" name="sendSms"/>
        </td>
    </tr>
    <tr>
        <th>
            &nbsp;
        </th>
        <td>
            <input type="submit" class="button" value="提交" />
            <input type="button" class="button" value="返回" onclick="location.href='list.do'" />
        </td>
    </tr>
</table>

<script type="text/javascript">
    $(function(){
        // 表单验证
        var $inputForm=$("#inputForm");
        $inputForm.validate({
            submitHandler: function(form) {
                layer.load(0, {
                    shade: [0.7,'#333'] //0.1透明度的白色背景
                });
                $.ajax({
                    url: $inputForm.attr("action"),
                    type: "POST",
                    data: $(form).serializeArray(),
                    dataType: "json",
                    cache: false,
                    success: function(message) {
                        layer.closeAll('loading');
                        if (message.type == "success") {
                            layer.msg(message.content);
                        } else {
                            layer.msg(message.content);
                        }
                    }
                });
            }
        });

    })
</script>
</body>
</html>